<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试angular js</title>
<script type="text/javascript" src="/resources/js/angular.js"></script>
</head>
<body>
	<div ng-app="myApp"  ng-controller="myCtrl">
		<label>Name:</label> <input type="text" ng-model="yourName"
			placeholder="Enter a name here">
		<hr>
		<h1>Hello {{yourName|uppercase}}!</h1>
		名: <input type="text" ng-model="firstName"><br>
		 姓: <input type="text" ng-model="lastName"><br> 
		姓名为 {{fullName()}}
		<ul>
			<li ng-repeat="a in tt">{{a}}</li>
		</ul>
		<span ng-repeat='x in aa'>{{x}}<br></span>

	</div>
	<script>
		var app = angular.module("myApp", [])
		app.controller("myCtrl", function($scope) {
			$scope.tt = [ "email", 'jaxck', 'lsm', '11' ];
			$scope.aa = [ "email", 'jaxck', 'lsm', '1122' ];
			  $scope.firstName = "John";
			    $scope.lastName = "Doe";
			    $scope.fullName = function() {
			        return $scope.firstName + " " + $scope.lastName;
			    }
		})
	</script>
</body>
</html>